﻿using System;
using System.ComponentModel.DataAnnotations;

namespace Actya.Core.Content
{
	/// <summary>
	/// The simplest content type possible.
	/// </summary>
	public class SimpleContent : ContentBase
	{
		[Required]
		public string Content { get; set; }

		public override string ContentAsText
		{
			get { return Content; }
		}

		public override IContent SanitizeContent(Func<string, string> sanitize)
		{
			this.Content = sanitize(this.Content);
			return this;
		}
	}
}
